﻿using System.Text;
using System.Collections.Generic;

namespace NazTek.Documenter.Ssis.Control.Tasks
{
    internal abstract class SsisTaskBase : ISsisTask
    {
        public string Name { get; set; }
        public string Description { get; set; }
        public abstract string Documentation { get; }
        public ICollection<ISsisTask> Children { get; set; }
        public void BuildDoc(StringBuilder container)
        {
            container.AppendLine(Documentation);
            if (Children == null || Children.Count == 0)
                return;
            foreach (var t in Children)
                t.BuildDoc(container);
        }
    }
}